﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<h2>Show</h2>
<script type="text/javascript">
    $(function () {
        initControl();
        gridList();
    });
    function initControl() {
        $('select').bindSelect();
    }
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            url: "/VBaseData/V_CPK_11_DJ_StoRegister/GetGridJson",
            height: $(window).height() - 200,
            colModel: [
            { label: "来料单位", name: "FHappenCompanyNO", width: 100, align: 'center' },
            { label: "来料单位名称", name: "FHappenCompanyName", width: 130, align: 'center' },
            { label: '入库日期', name: 'FCurDate', width: 80, align: 'center' },
            { label: '零部件号', name: 'FProductionNO', width: 80, align: 'center' },
            { label: '零件名称', name: 'FProductionName ', width: 100, align: 'center' },
            { label: '批次号',   name: 'FBatchNo', width: 80, align: 'center' },
            { label: '开票数量', name: 'FQuantity_KP', width: 60, align: 'center' },
            { label: '实际数量', name: 'FQuantity', width: 60, align: 'center' },
            { label: '容器编号', name: 'FContainerNO', width: 60, align: 'center' },
            { label: '容器名称', name: 'FContainerName', width: 80, align: 'center' },

            { label: '容器数量', name: 'FContainerQuantity', width: 60, align: 'center' },
            { label: '实际装箱', name: 'FFactContent', width: 60, align: 'center' },
            { label: '标准装箱', name: 'FContent', width: 60, align: 'center' },
            { label: '托盘编号', name: 'FPalletNO', width: 60, align: 'center' },
            { label: '托盘数量', name: 'FPalletQuantity', width: 60, align: 'center' },

            { label: '实际容量', name: 'FContainerNO', width: 60, align: 'center' },
            { label: '标准容量', name: 'FContainerQuantity', width: 60, align: 'center' },
            { label: '凭证编号', name: 'FVoucherNo', width: 80, align: 'center' },
            { label: '备注', name: 'FDescription', width: 100, align: 'center' },
            { label: '制造单位', name: 'FProCompanyNO', width: 100, align: 'center' },

            { label: '制造单位名称', name: 'FProCompanyName', width: 120, align: 'center' },
            { label: '零件状态', name: 'FState', width: 60, align: 'center' },
            { label: '输入人员', name: 'FUpdateBy', width: 80, align: 'center' },
            { label: '输入日期', name: 'FUpdateDate', width: 80, align: 'center' },
            { label: '输入时间', name: 'FUpdateTime', width: 100, align: 'center' },
            ],
            pager: "#gridPager",
            sortname: 'DH asc',
            viewrecords: true,
            onSelectRow: function (rowid) {
                var rowData = $gridList.jqGrid('getRowData', rowid);
                $('#txtCurrDH').val(rowData.DH);
            }
        });
        $("#btn_search").click(function () {
            $gridList.jqGrid('setGridParam', {
                postData: { keyword: $("#txt_keyword").val() },
            }).trigger('reloadGrid');
            $('#txtCurrDH').val("");
        });
    }
</script>
<div id="layout" style="height: 80%; width: 100%;">
    <form id="form1">
        <div style="padding: 12px 0 5px 0; padding-left: 15px; border-bottom: 1px solid #ccc; " class="line-table input-width-105">
            <div class="btn-group" style="margin-top:-9px;">
                  <input id="txt_keyword" name="txt_keyword" placeholder="" type="text" class="form-control required" /> &nbsp;
            </div>
            <div class="btn-group" style="">
                <a id="btn_search" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-search"></span> 查询</a>
            </div>
        </div>
    </form>
    <div style="">
        @*<input id="txtCurrDH" name="txtCurrDH" type="hidden" value="" />*@
        <table id="gridList"></table>
        <div id="gridPager"></div>
    </div>
</div>



